﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ppt = Microsoft.Office.Interop.PowerPoint;

namespace ObjectModel.PowerPoint.New
{
    public class SimpleConstantSource : SourceObject
    {
        IConstantsCollection mConstants;

        public SimpleConstantSource() // Parameterless constructor required for deserialization.
        {
            Ppt.Presentation pres = Globals.Application.ActivePresentation;
            mConstants = Globals.PresentationConstants[pres].Constants as IConstantsCollection;
        }

        public string Name { get; set; }

        public override string GetValue()
        {
            return mConstants.Lookup(Name).Value;
        }
    }
}
